package com.itpengwei.decorator;

/**
 * @author: pengwei
 * @date: 2019/12/3 4:49 下午
 */
public class Decorator implements Sourceable {
    private Sourceable sourceable;

    public Decorator(Sourceable sourceable) {
        this.sourceable = sourceable;
    }

    @Override
    public void method() {
        System.out.println("----目标方法之前-------");
        sourceable.method();
        System.out.println("----目标方法之后-----");
    }
}
